
#ifndef __3d_primitivesH__
#define __3d_primitivesH__

#include "3d.h"

namespace WtfGraphics {
	class PrimitiveModel: public Mesh {
	public:
		typedef Mesh IPrimitive;

		PrimitiveModel(const WtfEngine::StringPool::Entry& sName);
		PrimitiveModel(const WtfEngine::StringPool::Entry& sName, const IPrimitive::tRef& rPrim);

		void InsertPrimitive(const IPrimitive::tRef& rPrim, const tPosition& vPos, const Orientation3D& ori);

		DATA_RECONSTRUCTIBLE(PrimitiveModel, GC_ADDEDSIZE_AUTO(Mesh, PrimitiveModel));
	};

	namespace Primitives
	{
		class Quad : public Mesh
		{
			public:
				Quad(tVector c1, tVector c2, tVector c3, tVector c4);

				DATA_RECONSTRUCTIBLE(Quad, GC_ADDEDSIZE_AUTO(Mesh, Quad));
		};


		class Oblong : public Mesh
		{
			public:
				Oblong(tScalar sizeX, tScalar sizeY, tScalar sizeZ);

				DATA_RECONSTRUCTIBLE(Oblong, GC_ADDEDSIZE_AUTO(Mesh, Oblong));
		};

		class Cube : public Mesh
		{
			public:
				Cube(tScalar size);

				DATA_RECONSTRUCTIBLE(Cube, GC_ADDEDSIZE_AUTO(Mesh, Cube));
		};

		class Cylinder : public Mesh
		{
			public:
				Cylinder (tScalar radius, tScalar height, int sections);

				DATA_RECONSTRUCTIBLE(Cylinder, GC_ADDEDSIZE_AUTO(Mesh, Cylinder));
		};

		class Sphere : public Mesh
		{
			public:
				Sphere (tScalar radius, int hsections, int vsections);

				DATA_RECONSTRUCTIBLE(Sphere, GC_ADDEDSIZE_AUTO(Mesh, Sphere));
		};
	};
};


#endif
